matches:: Int -> [Int] -> [Int]
matches _ [] = []
matches n (x:xs)
	| n == x = x:(matches n xs)
	| otherwise = matches n xs

divisores n = [x| x <- [1..(n-1)],mod n x == 0]

suma:: [Int] -> Int
suma [] = 0
suma (x:xs) = x + suma xs

perfecto:: Int -> Bool
perfecto x = suma(divisores x) == x
